package com.metacube.questionbank.service;

import java.util.List;

import com.metacube.questionbank.model.Question;

/*
 * @author Team Neeraj Jain
 * */
public interface QuestionService {
	/*
	 * This method returns all the questions that are asked by any user.
	 * 
	 * @return list of questions
	 */
	public List<Question> getQuestions();

	/*
	 * @param qId id of question This method returns the question by its id.
	 * 
	 * @return question as per the id.
	 */
	public Question getQuestionByQId(int qId);

	/*
	 * @param objQuestion object of Question class This method inserts question
	 * in the database.
	 */
	public void insertQuestion(Question objQuestion);

	/*
	 * @param query query typed by user. This method returns a list of related
	 * questions on the basis of query written by user.This method finds the
	 * tags in the query and finds the questions that are related to those tags.
	 * 
	 * @return list of related questions.
	 */
	public List<Question> getRelatedQuestions(String query);

	/*
	 * This method returns the maximum question id from the database
	 * 
	 * @return maxQId
	 */
	public int getMaxQId();

	/*
	 * This method returns a list of questions which are unanswered.
	 * 
	 * @return list of questions.
	 */
	public List<Question> getUnAnsweredQuestions();

	/*
	 * @param userId id of user This method returns a list of questions that are
	 * posted by a particular user.
	 * 
	 * @return list of questions
	 */
	public List<Question> getQuestionGivenByUser(int userId);
}
